import request from '@/lib/request';

const api = {
    /**
     * 检测是否是授权人
     * app.vancloud.com/vantopapp/electronic/getAuthorizerPerson?loginUserCode=A0001&tenant_id=735893790648176640
     * @param {*} data 
     * @returns 
     */
    getUserFalg(data) {
        return request.post("/electronic/getAuthorizerPerson", data)
    },
    /**
     * 获取授权人签章列表
     * @param {pageNo:1,pageSize:10,loginUserCode:A0001,tenant_id:735893790648176640} data 
     * @returns 
     */
    getAuthorContract(data) {
        return request.post("/vantopapp/electronic/getAuthorizerElectronicContract", data);
    },
    /**
     * 获取个人合同列表
     * @param {pageNo=1&pageSize=10&loginUserCode=D0025&tenant_id=735893790648176640} data 
     * @returns 
     */
    getSelfContract(data) {
        return request.post("/vantopapp/electronic/getMyselfElectronicContract", data)
    },
    /**
     * 获取个人合同详情
     * @param {taskId=237993843340431&loginUserCode=D0025&tenant_id=735893790648176640} data 
     * @returns 
     */
    getSelfDetailContract(data) {
        return request.post("/vantopapp/electronic/getAuthorizerContractInfo", data)
    },
    /**
     * 获取授权人合同详情
     * @param {taskId=237993843340431&loginUserCode=D0025&tenant_id=735893790648176640} data 
     * @returns 
     */
    getAuthorDetailContract(data) {
        return request.post("/vantopapp/electronic/getAuthorizerContractInfo", data);
    },
    /**
     * 签章
     */
    singContract(data) {
        return request.post("/electronic/signContractByTaskId", data);
    },
    /**
     * 检测是否授权
     */
    singAuthor(data) {
        return request.get("/electronic/judgementRegistered", {
            params: data
        })
    },
    /**
     * 合同废弃
     * /electronic/scrapContract
     */
    scrapContract(data){
        return request.post("/electronic/scrapContract",data)
    },
    /**拒绝签章**/
    rejectSign(data){
        return request.post("/electronic/rejectSign",data)
    }

}

export default api